/*
 * @Author: tcosfish
 * @Date: 2022-08-19 17:34:35
 * @LastEditors: tcosfish
 * @LastEditTime: 2022-08-19 17:34:35
 * @FilePath: \loadFile\src\excel\RyExcel\getVal.ts
 */
export function getVal(
  data: any[],
  index: string,
  key: string = "credit_amount"
) {
  let val
  for (const item of data) {
    if (item.code === index) {
      val = item[key]
      break
    }
  }
  return val
}
